3.1.33 \(\int \frac {3-2 \sqrt {3}+(-3+\sqrt {3}) x^4}{1-x^4+x^8} \, dx\)

Optimal. Leaf size=180 \[ \frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2-\sqrt {2-\sqrt {3}} x+1\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2+\sqrt {2-\sqrt {3}} x+1\right )+\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 180, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1423, 1161, 618, 204, 1164, 628} \begin {gather*} \frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2-\sqrt {2-\sqrt {3}} x+1\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2+\sqrt {2-\sqrt {3}} x+1\right )+\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]

[Out]

(Sqrt[3*(2 - Sqrt[3])]*ArcTan[(Sqrt[2 + Sqrt[3]] - 2*x)/Sqrt[2 - Sqrt[3]]])/2 - (Sqrt[3*(2 - Sqrt[3])]*ArcTan[
(Sqrt[2 + Sqrt[3]] + 2*x)/Sqrt[2 - Sqrt[3]]])/2 + (Sqrt[3*(2 - Sqrt[3])]*Log[1 - Sqrt[2 - Sqrt[3]]*x + x^2])/4
 - (Sqrt[3*(2 - Sqrt[3])]*Log[1 + Sqrt[2 - Sqrt[3]]*x + x^2])/4

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1161

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(2*d)/e - b/c, 2]},
Dist[e/(2*c), Int[1/Simp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /
; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[(2*d)/e - b/c, 0] || ( !Lt
Q[(2*d)/e - b/c, 0] && EqQ[d - e*Rt[a/c, 2], 0]))

Rule 1164

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(-2*d)/e - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rule 1423

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[a/c, 2]},
With[{r = Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x^(n/2))/(q - r*x^(n/2) + x^n), x], x] + D
ist[1/(2*c*q*r), Int[(d*r + (d - e*q)*x^(n/2))/(q + r*x^(n/2) + x^n), x], x]]] /; FreeQ[{a, b, c, d, e}, x] &&
 EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[n/2, 0] && NegQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {3-2 \sqrt {3}+\left (-3+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx &=\frac {\int \frac {\sqrt {3} \left (3-2 \sqrt {3}\right )+\left (-6+3 \sqrt {3}\right ) x^2}{1-\sqrt {3} x^2+x^4} \, dx}{2 \sqrt {3}}+\frac {\int \frac {\sqrt {3} \left (3-2 \sqrt {3}\right )+\left (6-3 \sqrt {3}\right ) x^2}{1+\sqrt {3} x^2+x^4} \, dx}{2 \sqrt {3}}\\ &=\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \int \frac {\sqrt {2-\sqrt {3}}+2 x}{-1-\sqrt {2-\sqrt {3}} x-x^2} \, dx+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \int \frac {\sqrt {2-\sqrt {3}}-2 x}{-1+\sqrt {2-\sqrt {3}} x-x^2} \, dx-\frac {1}{4} \left (-3+2 \sqrt {3}\right ) \int \frac {1}{1-\sqrt {2+\sqrt {3}} x+x^2} \, dx-\frac {1}{4} \left (-3+2 \sqrt {3}\right ) \int \frac {1}{1+\sqrt {2+\sqrt {3}} x+x^2} \, dx\\ &=\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{2} \left (3-2 \sqrt {3}\right ) \operatorname {Subst}\left (\int \frac {1}{-2+\sqrt {3}-x^2} \, dx,x,-\sqrt {2+\sqrt {3}}+2 x\right )-\frac {1}{2} \left (3-2 \sqrt {3}\right ) \operatorname {Subst}\left (\int \frac {1}{-2+\sqrt {3}-x^2} \, dx,x,\sqrt {2+\sqrt {3}}+2 x\right )\\ &=\frac {1}{2} \sqrt {6-3 \sqrt {3}} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {6-3 \sqrt {3}} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}+2 x}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 89, normalized size = 0.49 \begin {gather*} \frac {1}{4} \text {RootSum}\left [\text {$\#$1}^8-\text {$\#$1}^4+1\&,\frac {\sqrt {3} \text {$\#$1}^4 \log (x-\text {$\#$1})-3 \text {$\#$1}^4 \log (x-\text {$\#$1})-2 \sqrt {3} \log (x-\text {$\#$1})+3 \log (x-\text {$\#$1})}{2 \text {$\#$1}^7-\text {$\#$1}^3}\&\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]

[Out]

RootSum[1 - #1^4 + #1^8 & , (3*Log[x - #1] - 2*Sqrt[3]*Log[x - #1] - 3*Log[x - #1]*#1^4 + Sqrt[3]*Log[x - #1]*
#1^4)/(-#1^3 + 2*#1^7) & ]/4

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {3-2 \sqrt {3}+\left (-3+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]

[Out]

IntegrateAlgebraic[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8), x]

________________________________________________________________________________________

fricas [A]  time = 1.55, size = 141, normalized size = 0.78 \begin {gather*} -\frac {1}{2} \, \sqrt {-3 \, \sqrt {3} + 6} \arctan \left (\frac {1}{3} \, x^{3} {\left (2 \, \sqrt {3} + 3\right )} \sqrt {-3 \, \sqrt {3} + 6} - \frac {1}{3} \, x {\left (\sqrt {3} + 3\right )} \sqrt {-3 \, \sqrt {3} + 6}\right ) - \frac {1}{2} \, \sqrt {-3 \, \sqrt {3} + 6} \arctan \left (\frac {1}{3} \, x {\left (2 \, \sqrt {3} + 3\right )} \sqrt {-3 \, \sqrt {3} + 6}\right ) + \frac {1}{4} \, \sqrt {-3 \, \sqrt {3} + 6} \log \left (\frac {3 \, x^{2} - \sqrt {3} x \sqrt {-3 \, \sqrt {3} + 6} + 3}{3 \, x^{2} + \sqrt {3} x \sqrt {-3 \, \sqrt {3} + 6} + 3}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="fricas")

[Out]

-1/2*sqrt(-3*sqrt(3) + 6)*arctan(1/3*x^3*(2*sqrt(3) + 3)*sqrt(-3*sqrt(3) + 6) - 1/3*x*(sqrt(3) + 3)*sqrt(-3*sq
rt(3) + 6)) - 1/2*sqrt(-3*sqrt(3) + 6)*arctan(1/3*x*(2*sqrt(3) + 3)*sqrt(-3*sqrt(3) + 6)) + 1/4*sqrt(-3*sqrt(3
) + 6)*log((3*x^2 - sqrt(3)*x*sqrt(-3*sqrt(3) + 6) + 3)/(3*x^2 + sqrt(3)*x*sqrt(-3*sqrt(3) + 6) + 3))

________________________________________________________________________________________

giac [A]  time = 0.45, size = 131, normalized size = 0.73 \begin {gather*} \frac {1}{4} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \arctan \left (\frac {4 \, x + \sqrt {6} + \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{4} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \arctan \left (\frac {4 \, x - \sqrt {6} - \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{8} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \log \left (x^{2} + \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) - \frac {1}{8} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \log \left (x^{2} - \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="giac")

[Out]

1/4*(sqrt(6) - 3*sqrt(2))*arctan((4*x + sqrt(6) + sqrt(2))/(sqrt(6) - sqrt(2))) + 1/4*(sqrt(6) - 3*sqrt(2))*ar
ctan((4*x - sqrt(6) - sqrt(2))/(sqrt(6) - sqrt(2))) + 1/8*(sqrt(6) - 3*sqrt(2))*log(x^2 + 1/2*x*(sqrt(6) - sqr
t(2)) + 1) - 1/8*(sqrt(6) - 3*sqrt(2))*log(x^2 - 1/2*x*(sqrt(6) - sqrt(2)) + 1)

________________________________________________________________________________________

maple [C]  time = 0.01, size = 62, normalized size = 0.34 \begin {gather*} \frac {\left (-6 \RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )^{4}+2 \sqrt {3}\, \RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )^{4}+\left (-3+\sqrt {3}\right ) \left (\sqrt {3}-1\right )\right ) \ln \left (-\RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )+x \right )}{16 \RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )^{7}-8 \RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x)

[Out]

1/8*sum(1/(2*_R^7-_R^3)*(-6*_R^4+2*3^(1/2)*_R^4+(-3+3^(1/2))*(3^(1/2)-1))*ln(-_R+x),_R=RootOf(_Z^8-_Z^4+1))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{4} {\left (\sqrt {3} - 3\right )} - 2 \, \sqrt {3} + 3}{x^{8} - x^{4} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="maxima")

[Out]

integrate((x^4*(sqrt(3) - 3) - 2*sqrt(3) + 3)/(x^8 - x^4 + 1), x)

________________________________________________________________________________________

mupad [B]  time = 2.23, size = 1, normalized size = 0.01 \begin {gather*} 0 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4*(3^(1/2) - 3) - 2*3^(1/2) + 3)/(x^8 - x^4 + 1),x)

[Out]

0

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: PolynomialError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x**4*(-3+3**(1/2))-2*3**(1/2))/(x**8-x**4+1),x)

[Out]

Exception raised: PolynomialError

________________________________________________________________________________________